<%@ page language="java" contentType="application/vnd.ms-excel"
    pageEncoding="UTF-8"%>
<%@ page import="dao.*,pojo.*,java.util.*"%>
<%
	SachDAO sachDAO = new SachDAO();
	List<SachPOJO> bookList = sachDAO.getAllSach();
%>
<table border="1">
<tr>
	<td>No.</td>
	<td>Book Id</td>
	<td>Book Name</td>
	<td>Author</td>
	<td>Price</td>
	<td>So Luong</td>
	<td>Danh Muc</td>
</tr>

<% 
	for(int i = 0; i < bookList.size(); i++){ 
		SachPOJO sach = bookList.get(i);
%>
<tr>
	<td><%= (i + 1) %></td>
	<td><%= sach.getMaSach() %></td>
	<td><%= sach.getTenSach() %></td>
	<td><%= sach.getTacGia() %></td>
	<td><%= sach.getGiaBan() %></td>
	<td><%= sach.getSoLuong() %></td>
	<td><%= sach.getDanhMuc().getTenDanhMuc() %></td>	
</tr>
<%} %>
</table>
